
		<?php if(empty($register['Page']['id'])){ ?>
		<h4><img src="<?php echo $html->url('/img/admin/user_pencil.png');?>" /> <?php __('add_users');?></h4>
		<?php }else{?>
		<h4><img src="<?php echo $html->url('/img/admin/user_pencil.png');?>" /> <?php __('edit_users');?></h4>
		<?php } ?>

		<form id="f_register" action="<?php echo $html->url('add'); ?>" method="post" onSubmit="event.returnValue = false; return false;">
			<div class="white_box white_box_last">
				<label><?php __('user_name');?></label>
				<?php echo $form->text('User.username',array('value' => $register['User']['username'], 'style' => 'width:690px;', 'class' => 'input_text'));?>

				<?php if(!empty($register['User']['id'])){?>
				<label><input type="checkbox" name="change_password" onClick="javascript:Effect.toggle('field_pass', 'blind');" value="1" /> <?php __('change_password');?></label>
				<?php } ?>

				<div id="field_pass" <?php if(!empty($register['User']['id'])){?> style="display:none;" <?php } ?>>
					<label><?php __('password');?></label>
					<?php echo $form->password('User.password', array('style' => 'width:690px;', 'class' => 'input_text'));?>
					<div id="pass_strength"></div>

					<label><?php __('repassword');?></label>
					<?php echo $form->password('User.repassword', array('style' => 'width:690px;', 'class' => 'input_text'));?>
				</div>

				<label><?php __('group');?></label>
				<select name="data[User][group_id]" id="UserGroupId">
				<?php foreach ($groups as $group) {?>
				  <option value="<?php echo $group['Group']['id'];?>" <?php if($group['Group']['id'] == $register['User']['group_id']) echo "selected=\"selected\""?>><?php echo $group['Group']['name'];?></option>
				<?php } ?>
				</select>
				
				<label><?php __('email');?></label>
				<?php echo $form->text('User.email',array('value' => $register['User']['email'], 'style' => 'width:690px;', 'class' => 'input_text'));?>
										
				<!-- Se activa o se guarda -->
				<?php echo $form->hidden('User.active',array('value' => $register['User']['active']));?>
				<!-- ID que pertenece el user -->
				<?php echo $form->hidden('User.id',array('value' => $register['User']['id']));?>
			</div>
			<input type="submit" name="bot_guardar" class="input_button" value="<?php __('save');?>" onClick="javascript:$('UserActive').value='0';" />
			<input type="submit" name="bot_activar" class="input_button" value="<?php __('activate');?>" onClick="javascript:$('UserActive').value='1';" />
		</form>
		<script type="text/javascript">
		//<![CDATA[
		Event.observe('f_register', 'submit', function(event){ajaxFormRequest('f_register','ajax_loading');}, false);
		Event.observe('UserPassword', 'keyup', function(event){ajaxGetPasswordStrength('UserPassword', 'pass_strength', '<?php echo $html->url(array("controller"=>$this->params["controller"], "action"=>"getPassStrength", "admin" => true)); ?>');}, false);
		//]]>
		</script>
